/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartElectricMeter {
    static categoryCode = '010010007';

    static categoryName = '智能电表';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return SmartElectricMeter.categoryCode;
    }

    get categoryName() {
        return SmartElectricMeter.categoryName;
    }

    getBalanceMoney(params) {
        return command({
            method: 'getBalanceMoney',
            methodId: 'pghzV1lZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getChargeMoney(params) {
        return command({
            method: 'getChargeMoney',
            methodId: 'pDrhxkCd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentElectricity(params) {
        return command({
            method: 'getCurrentElectricity',
            methodId: 'ptRSARkS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentPower(params) {
        return command({
            method: 'getCurrentPower',
            methodId: 'phEqZoIL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentVoltage(params) {
        return command({
            method: 'getCurrentVoltage',
            methodId: 'pdN7hWjV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDayEnergy(params) {
        return command({
            method: 'getDayEnergy',
            methodId: 'p1vFkqSr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMonthEnergyg(params) {
        return command({
            method: 'getMonthEnergyg',
            methodId: 'pGoxuvcA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pUPQQihU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTotalEnergy(params) {
        return command({
            method: 'getTotalEnergy',
            methodId: 'pZgRgH0C',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setChargeMoney(params) {
        return command({
            method: 'setChargeMoney',
            methodId: 'ppAXpyFw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyXjHP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartElectricMeter;
